import os
import shutil

from sympy import false

from PIL import Image
from app.utils.index import file2base64, base2file, base642PIL
from app.model import Photo, PhotoResponse
from app.service import PhotoService


input_dir = r"E:\workspace\machine-learning\yolo\测试\2024-12-19"
output_dir = r"E:\workspace\machine-learning\yolo\测试\2024-12-19_原片"



if __name__ == "__main__":
  if not os.path.exists(output_dir):
    os.mkdir(output_dir)

  for root, dirs, files in os.walk(input_dir):
    for file in files:
      if not "_" in file:
        file_name = os.path.basename(file)
        source_file = os.path.join(input_dir, file_name)
        dist_file = os.path.join(output_dir, file_name)
        shutil.copy(source_file, dist_file)

